package com.xinruke.hostels.reservation.interfaces.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author GuoZheng
 * @ClassName submitInfoDto
 * @date：2019/6/19
 * @version: V1.0.0
 * @description：
 */
@Data
@ApiModel("订单提交信息")
public class RoomOrderSubmitInfoDTO {

    /**
     * 酒店id
     */
    @ApiModelProperty(value = "酒店id", required = true)
    @NotNull(message = "酒店id不能为空")
    private Integer jiudianId;

    /**
     * 入住时间
     */
    @ApiModelProperty(value = "入住时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date ruzhushijian;

    /**
     * 离开时间
     */
    @ApiModelProperty(value = "离开时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date likaishijian;

    /**
     * 单位名称
     */
    @ApiModelProperty("单位名称")
    private Byte danweimingcheng;

    /**
     * 单位id
     */
    @ApiModelProperty("单位id")
    private Byte danweiId;



    /**
     * 订单总价
     */
    @ApiModelProperty(value = "订单总价",required = true)
    @NotNull(message = "订单总价不能为空")
    private BigDecimal dingdanzongjia;


    /**
     * 优惠金额
     */
    @ApiModelProperty(value = "房间优惠金额，默认传0（不是优惠价！优惠价格=mendianjia-youhuijia）",required = true)
    @NotNull(message = "优惠金额不能为空")
    private BigDecimal youhuijine;

    @Valid
    @ApiModelProperty(value = "房间预订信息", required = true)
    @NotEmpty(message = "至少选择一个房型")
    private List<RoomOrderInfoQueryDto> roomReservationInfoDto;

}
